package com.xinqi.modules.prepare.common.service;

import com.xinqi.modules.prepare.prepare.enums.PrepareMemberPermissionEnum;

/**
 * 备课区权限校验服务
 *
 * @author linkai
 * @date 2023/3/20
 */
public interface PrepareAuthService {
    /**
     * 验证备课区成员权限
     *
     * @param prepareId  备课区ID
     * @param userId     用户ID
     * @param permission 权限ID
     * @return 是否有权限
     */
    boolean validate(Long prepareId, Long userId, PrepareMemberPermissionEnum permission);

    /**
     * 校验备课区成员权限
     *
     * @param prepareId  备课区ID
     * @param userId     成员ID
     * @param permission 权限ID
     */
    void check(Long prepareId, Long userId, PrepareMemberPermissionEnum permission);

    void check(Long prepareId, PrepareMemberPermissionEnum permission);
}
